Optimizing compilers may create binary executable programs from high level languages, and may perform many different types of optimization on source code to achieve faster runtime execution and smaller memory footprint. In one example of optimization, complex series of statements in a high level language may be reduced to a few, succinct statements in the binary executable. In another example of optimization, a single register or other memory location may be used for different variables at different stages of a program's execution. The result of an optimizing compiler is often an executable program that does not correlate well with the original high level language.
When debugging an executable program, often much of the debugging is performed without optimizing functions. In many cases, various debugging environments may be used to step through the source code to verify program execution, check variable values, and test the operation of the code. Such debugging functions may become much more difficult when a compiler's optimization functions are used, since the correlation between the executing code and the source code may be degraded.
In many cases, optimizing compilers may generate a program database that may contain some information regarding memory locations and variables, as well as some optimizations performed on the source code. Many such program databases offer some mapping between a source code file and an executable binary, but often not enough information that may allow a debugging application to unwind or decompile the executable binary to correlate with the source code. Even with the program databases, debugging optimized compiled code can be very difficult due to the lack of correlation between the executable code and the original source code.